package com.antonytrupe.gamething;

import junit.framework.TestCase;

import org.junit.After;
import org.junit.Before;

import com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalMemcacheServiceTestConfig;
import com.google.appengine.tools.development.testing.LocalServiceTestHelper;

public class GAETestCase extends TestCase {
	LocalServiceTestHelper helper;

	@Override
	@Before
	public void setUp() {
		LocalDatastoreServiceTestConfig dsConfig = new LocalDatastoreServiceTestConfig();

		LocalMemcacheServiceTestConfig mcConfig = new LocalMemcacheServiceTestConfig();

		dsConfig.setBackingStoreLocation("C:\\local_db.bin"); //$NON-NLS-1$
		// this needs to be false to persist, but in unit tests, why do so?
		dsConfig.setNoStorage(true);
		dsConfig.setDefaultHighRepJobPolicyUnappliedJobPercentage(0);
		this.helper = new LocalServiceTestHelper(dsConfig, mcConfig).setUp();
	}

	@Override
	@After
	public void tearDown() {
		this.helper.tearDown();
	}

	// make sure we can setUp and tearDown without any issues
	public void test() {
		//
	}
}